package bluejack.operation;
import nme.events.TimerEvent;
import nme.utils.Timer;

/**
 * ...
 * @author BlueJack
 */

class TimeoutOper extends Oper
{
	public var timeout:Int;

	public function new(timeout:Int = 1000) {
		super();
		this.timeout = timeout;
	}
	
	override public function execute():Void {
		var timer:Timer = new Timer(timeout, 1);
		timer.addEventListener(TimerEvent.TIMER_COMPLETE, fault);
		timer.start();
		super.execute();
	}
	
}